<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/7/2
 * Time: 下午10:45
 */


//echo getcwd().PHP_EOL;
//$file = '/etc/profile\0';//$_GET['file']; // "../../etc/passwd\0"
$file = __FILE__;
if (file_exists($file.'.php')) {
    // file_exists will return true as the file /home/wwwrun/../../etc/passwd exists
    $i = include $file.'.php';
    // the file /etc/passwd will be included
    var_dump($i);
    echo "------";
}
if (file_exists($file)){
    echo file_get_contents($file);
    echo "----";
}


show_source(__FILE__);

highlight_file(__FILE__);

highlight_string('$a');
